package org.qydjk.h5.controller.customerCenter;

import org.qydjk.common.pojo.user.User;
import org.qydjk.h5.controller.base.BaseController;
import org.qydjk.service.service.customerCenter.ICustomerCenterHomePageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Administrator on 2018/1/3 0003.
 */
@Controller
@RequestMapping("/customer")
public class CustomerCenterHomePageController extends BaseController {

    @Autowired
    private ICustomerCenterHomePageService iCustomerCenterHomePageService;

    /**
     * 个人中心首页面
     * @return 个人中心页面地址
     */
    @RequestMapping("/center.do")
    private String customerCenterHomePageIndex() {
        Integer userId = getUserId();
        try {
            User user = iCustomerCenterHomePageService.getCustomerInfo(userId);
            request.setAttribute("user", user);
            return "customer/center";
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    /**
     * 帮助中心
     * @return 页面地址
     */
    @RequestMapping("/help.do")
    public String help() {
        return "customer/help";
    }

    /**
     * 关于产品
     * @return 页面地址
     */
    @RequestMapping("/AboutProduct.do")
    public String aboutProduct() {
        return "customer/aboutProduct";
    }

    /**
     * 关于预约
     * @return 页面地址
     */
    @RequestMapping("/aboutSubscribe.do")
    public String aboutSubscribe() {
        return "customer/aboutSubscribe";
    }

    /**
     * 关于体检
     * @return 页面地址
     */
    @RequestMapping("/aboutCheck.do")
    public String aboutCheck() {
        return "customer/aboutCheck";
    }

    /**
     * 售后
     * @return 页面地址
     */
    @RequestMapping("/sellAfter.do")
    public String sellAfter() {
        return "customer/sellAfter";
    }

    /**
     * 收藏
     * @return 页面地址
     */
    @RequestMapping("/myCollection.do")
    public String myProduct() {
        return "customer/myCollection";
    }

    /**
     * 浏览记录
     * @return 页面地址
     */
    @RequestMapping("/myHistory.do")
    public String myHistory() {
        return "customer/myHistory";
    }

    /**
     * 套餐咨询列表
     * @return 页面地址
     */
    @RequestMapping("/myQuestions.do")
    public String myQuestions() {
        return "customer/myQuestions";
    }

    /**
     * 套餐咨询详情
     * @return 页面地址
     */
    @RequestMapping("/myQuestionsDetail.do")
    public String myQuestionsDetail() {
        return "customer/myQuestionsDetail";
    }
}
